<?php

namespace App\Lib\Taobao\request;
use RequestCheckUtil;

/**
 * TOP API: taobao.guangguang.content.resource.upload request
 *
 * @author auto create
 * @since 1.0, 2023.11.24
 */
class GuangguangContentResourceUploadRequest
{
    /**
     * 机构替用户发布内容时的映射id
     **/
    private $relationId;

    /**
     * 公网可访问的资源URL列表
     **/
    private $resourceUrls;

    private $apiParas = array();

    public function setRelationId($relationId)
    {
        $this->relationId = $relationId;
        $this->apiParas["relation_id"] = $relationId;
    }

    public function getRelationId()
    {
        return $this->relationId;
    }

    public function setResourceUrls($resourceUrls)
    {
        $this->resourceUrls = $resourceUrls;
        $this->apiParas["resource_urls"] = $resourceUrls;
    }

    public function getResourceUrls()
    {
        return $this->resourceUrls;
    }

    public function getApiMethodName()
    {
        return "taobao.guangguang.content.resource.upload";
    }

    public function getApiParas()
    {
        return $this->apiParas;
    }

    public function check()
    {

        RequestCheckUtil::checkNotNull($this->resourceUrls, "resourceUrls");
        RequestCheckUtil::checkMaxListSize($this->resourceUrls, 999, "resourceUrls");
    }

    public function putOtherTextParam($key, $value)
    {
        $this->apiParas[$key] = $value;
        $this->$key = $value;
    }
}
